{% extends "blog/base.html" %}
{% load pagebase %}
{% load blog.components.post %}
{% load blog.components.comment %}
{% block scripts %}
{{ "blog/post.js"|include_js }}
<script type="text/javascript">
	Post.init({
		commentUrl: '{{ post.get_absolute_url }}',
		ID: {{post.id}}
	});
</script>
{% endblock %}
{% block title %}{{post.title}} - {% endblock %}
{% block meta_copyright %}{{ post.license.name }}{% endblock %}
{% block meta_keywords %}{{ post.meta_keywords }}{% endblock %}
{% block meta_description %}{{ post.meta_description }}{% endblock %}
{% block main %}
<div id="post-body">
{{ post|blog_componsent_post_body:is_digged}}
</div>
<div id="comment-box">
	<h3>{{ post.comment_count }}个评论 <a href="#comment-post">发表评论</a></h3>
	<ul class="list">
		{{ comments|blog_componsent_comment_body }}
	</ul>
	<div id="comment-post" class="form">
		<h3>发表评论</h3>
		<form action="{{ post.get_absolute_url }}" method="POST">
		<table>
		{{ comment_form }}
		<tr>
			<th></th>
			<td><label for="id_follow"><input id="id_follow" type="checkbox" name="follow"/> 当有新评论的时候Email通知我</label></td>
		</tr>
		<tr>
			<th></th>
			<td><span id="messageBox"></span></td>
		</tr>
		<tr>
			<th></th><td><button type="submit" class="button submit">发表评论</button></td>
		</tr>
		</table>
		</form>
	</div>
</div>
{% endblock %}